package org.jeecg.modules.purchase.Vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.file.entity.ProcurementFile;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "PurchaseRecordVo对象", description = "采购记录Vo")
public class PurchaseRecordVo {

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "工程名称")
    @NotBlank(message = "工程名称不能为空")
    private String projectName;

    @ApiModelProperty(value = "项目编号")
    @NotBlank(message = "项目编号不11能为空")
    private String projectNumber;

    @ApiModelProperty(value = "中标供应商")
    private String winningName;

    @ApiModelProperty(value = "中标金额(万元)")
    private BigDecimal bidPrice;

    @ApiModelProperty(value = "已发布采购项目状态：1-公告，2-报名，3-投标，4-开标，5-评标，" +
            "6-中标，7-流标，8-废标，9-撤销，10-延期，11-终止，12-暂停，13-暂停，" +
            "14-重新招标，15-其他")
    @Dict(dicCode = "published_status")
    private String publishedStatus;

    @ApiModelProperty(value = "异常状态原因")
    @Column(name = "exception_status_reason")
    private String exceptionStatusReason;

    @ApiModelProperty(value = "异常状态备注")
    @Column(name = "exception_status_remark")
    private String exceptionStatusRemark;

    @ApiModelProperty(value = "计划采购时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(name = "plan_purchase_time")
    private Date planPurchaseTime;

    @ApiModelProperty(value = "公示时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "lottery_time")
    private Date lotteryTime;

    @ApiModelProperty(value = "文件数组")
    private List<ProcurementFile> procurementFile;

    @ApiModelProperty(value = "采购项目备注")
    private String remark;
}
